﻿@model Stardust.Models.ProveedorBean

@{
    ViewBag.Title = "Registrar Proveedor";
}

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@Html.ValidationSummary(true)
@using (Html.BeginForm("RegistrarProveedor", "Proveedor", FormMethod.Post, new { @class = "form" }))
{
  
    <fieldset>
        <div class="widget">
            <div class="title">
                <h6>Registrar Proveedor</h6>
            </div>
            <div class="formRow"> @Html.LabelFor(model => model.razonSocial)<span class="req">*</span>
                <div class="formRight">
                    @Html.TextBoxFor(model => model.razonSocial, new { maxlength = "50" })@ViewBag.error1
                    @Html.ValidationMessageFor(model => model.razonSocial) 
                </div>
                <div class="clear"></div>
            </div>
            <div class="formRow">@Html.LabelFor(model => model.ruc)<span class="req">*</span>
                <div class="formRight"> @Html.TextBoxFor(model => model.ruc, new { maxlength = "11" })@ViewBag.error2
                @Html.ValidationMessageFor(model => model.ruc) </div>
                <div class="clear"></div>
            </div>

            <div class="formRow">@Html.LabelFor(model => model.direccion)<span class="req">*</span>
                <div class="formRight"> @Html.TextBoxFor(model => model.direccion, new { maxlength = "50" }) 
                 @Html.ValidationMessageFor(model => model.direccion)</div>
                <div class="clear"></div>
            </div>
            <div class="formRow">@Html.LabelFor(model => model.telefono)
                 
                <div class="formRight"> @Html.TextBoxFor(model => model.telefono, new { maxlength = "9" }) 
                @Html.ValidationMessageFor(model => model.telefono)</div>
                <div class="clear"></div>
            </div>
            <div class="formRow">@Html.LabelFor(model => model.web)<span class="req">*</span>
                <div class="formRight"> @Html.TextBoxFor(model => model.web, new { maxlength = "30" })
                </div>
                <div class="clear"></div>
            </div>
            <div class="formRow">@Html.LabelFor(model => model.contacto)<span class="req">*</span>
                <div class="formRight"> @Html.TextBoxFor(model => model.contacto, new { maxlength = "48" }) 
                 @Html.ValidationMessageFor(model => model.contacto)</div>
                <div class="clear"></div>
            </div>
            <div class="formRow">@Html.LabelFor(model => model.cargoContacto)<span class="req">*</span>
                <div class="formRight"> @Html.TextBoxFor(model => model.cargoContacto, new { maxlength = "48" })
                 @Html.ValidationMessageFor(model => model.cargoContacto) </div>
                <div class="clear"></div>
            </div>
            <div class="formRow">@Html.LabelFor(model => model.telefonocontacto)
                <div class="formRight"> @Html.TextBoxFor(model => model.telefonocontacto, new { maxlength = "9" }) 
                 @Html.ValidationMessageFor(model => model.telefonocontacto)</div>
                <div class="clear"></div>
            </div>
            <div class="formRow">@Html.LabelFor(model => model.emailContacto)<span class="req">*</span>
                <div class="formRight"> @Html.TextBoxFor(model => model.emailContacto, new { maxlength = "40" ,placeholder = "Ejm: stardust@stardust.pe" }) 
                @Html.ValidationMessageFor(model => model.emailContacto) </div>
                <div class="clear"></div>
            </div>
            
            <div class="formRow">@Html.LabelFor(model => model.observaciones)
                <div class="formRight"> @Html.TextAreaFor(model => model.observaciones, new { maxlength = "45" }) </div>
                <div class="clear"></div>
            </div>            
            
        </div>
    </fieldset>

     <p>
        <input type="submit" value="Crear" class = "redB" />        
        @Html.ActionLink("Regresar", "Index")
    </p>
}
